<html>
<head>
	<script>
	function doGenData(allFlg){
		if(allFlg){
			var sel = 0;
			allRow = [];
			for(var i=0;i<rC+1;i++){
				var row = [];
				sel = Math.round(Math.random() * (rC-1));
				for(var j =0;j<cC;j++){
					//row.push(new Cell(i,j,(sel==j?"black":"white"),(sel==j?true:false)));
					row.push(new Cell(i,j,(sel==j?"green":"white"),(sel==j?true:false)));
				}
				allRow.push(row);
			}
		}else{
			var sel = 0;
			var row = [];
			sel = Math.round(Math.random() * (rC-1));
			for(var j =0;j<cC;j++){
				row.push(new Cell(i,j,(sel==j?"green":"white"),(sel==j?true:false)));
			}
			allRow.push(row);
		}
	}
	</script>
</head>
<body>
	<form name="f1">
	Stage: <input name="stage" value="First Throw"/>
	Point: <input name="pv" value=" "/>
	Outcome: <input name="outcome" value=" "/>
	</form>
	<form name="f2" onSubmit="doGenData();">
	Stage: <input type="text" name="stage" value="First Throw"/>
	Piont: <input type="text" name="pv" value=" "/>
	Outcome: <input type="text" name="outcome" value=" "/>
	<input type="submit" value="THROW DICE"/>
	</form>
</body>	
</html>